﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@model sipfe.model.dataAccess.SIPMaeEmpresa
@using Resources;
@using sipfe.util;
@{   
    Layout = "~/Views/Shared/Layaout/general/_LayoutPopGeneral.cshtml";    
}
<script type="text/javascript">
    $(function () {
        calendarioFechaNac('dfecFunda');
        setAutoAyudaCompendioDetalle("#vActivPrin", "#nIdeActPrin", 17, "/AutoAyuda/ListaDetCompendioAuto");
        setAutoAyudaCompendioDetalle("#vActivSecun", "#nIdeActSec", 17, "/AutoAyuda/ListaDetCompendioAuto");
        inicioPopPupModal("#divPopupJQ", 250, 680, "LISTADO DE ACTIVIDADES DE LA EMPRESA");
    });
</script>
<script type="text/javascript" language="javascript" src="@Url.Content(@properties.mantePersonaJS)"></script>
<script type="text/javascript" language="javascript" src="@Url.Content(@properties.ajaxJS)"></script>
<script type="text/javascript" language="javascript" src="@Url.Content(@properties.nuevoJS)" ></script>
<script type="text/javascript" language="javascript" src="@Url.Content(@properties.autocompleteJS)" ></script>
@using (Html.BeginForm("RegistraDatosEmpresaInp", "ManteEmpresa", FormMethod.Post))
{
    @Html.ValidationSummary(false, "Los Siguientes Campos son Obligatorios:")   
    @Html.HiddenFor(model => model.nIdeUsuReg, new { Value = @Session[Constante.N_IDE_USUARIO]})
    @Html.HiddenFor(model => model.dtFecReg, new { Value =@DateTime.Now.ToString()})
    @Html.HiddenFor(model => model.dFecIniVig, new { Value =@DateTime.Now.ToString()})
    @Html.HiddenFor(model => model.nIdeActPrin)
    @Html.HiddenFor(model => model.nIdeActSec)      
    <input type="hidden" name="swReg" value="@ViewBag.swReg" id="swReg" />
<fieldset style="width: 650px;" class="fieldsetStyle1">
    <legend class="tituloBlue9">Registrar Nueva Persona Juridica</legend>
    <table border="0" style="width: 100%;" cellpadding="0" cellspacing="0">
        <tbody>
            <tr>                
                <td>
                    <table border="0" cellpadding="0" cellspacing="0" width="100%">
                    <tbody class="tituloCelesteN8">
                        <tr>
                            <td>País Emisor<span class="asterisco">(*)</span></td>
                            <td>Tipo documento<span class="asterisco">(*)</span></td>
                            <td>Número documento<span class="asterisco">(*)</span></td>
                        </tr>                   
                        <tr>
                            <td>@Html.DropDownListFor(model => model.nIdeCodPaisDoc, (IEnumerable<SelectListItem>)ViewBag.PaisEmisor, "--Seleccione--", new { @class = "select8" })</td>
                            <td>@Html.DropDownListFor(model => model.nIdeTipoDocum, (IEnumerable<SelectListItem>)ViewBag.TipoDocIdent, "--Seleccione--", new { @class = "select8"})</td>
                            <td>@Html.TextBoxFor(model => model.vNumDocum, new { @class = "textBoxMay", style = "width:80px;text-transform:none;", maxlength = 20, onkeypress = "return validaAlfaNumTamanio(this,event,20);", onblur = "javascript:onBlurUpper(this); javascript:validaDocumentoPersona(this,'2','2','#nIdeTipoDocum','#nIdeCodPaisDoc');" })</td>
                        </tr>
                        <tr>
                            <td colspan="3">Nombre o Razón Social  <span class="asterisco">(*)</span></td>
                        </tr>
                        <tr>
                            <td colspan="3">@Html.TextBoxFor(model => model.vRazonSocial, new { style = "width:650px;", maxlength = 200, onblur = "javascript:onBlurUpper(this);" })</td>
                            
                        </tr>
                        <tr>
                            <td colspan="3">Actividad principal<span class="asterisco">(*)</span></td>
                        </tr>
                        <tr>
                            <td colspan="3">
                                @Html.TextBox("vActivPrin", null, new { style = "width:630px;", maxlength = 120 })
                                <img src="@Url.Content("~/images/buscar.gif")" class="lupita2" alt="BUSCAR ACTIVIDAD" onclick="javascript:listarActividad('#divPopupJQ','#vActivPrin','#nIdeActPrin');" />
                            </td>
                           
                        </tr>
                        <tr>
                            <td colspan="3">Actividad secundaria</td>
                        </tr>
                        <tr>
                           <td colspan="3">
                               @Html.TextBox("vActivSecun", null, new { style = "width:630px;", maxlength = 120 })
                               <img src="@Url.Content("~/images/buscar.gif")" class="lupita2" alt="BUSCAR ACTIVIDAD" onclick="javascript:listarActividad('#divPopupJQ','#vActivSecun','#nIdeActSec');" />
                           </td>                            
                        </tr>
                        <tr><td>Fecha de fundación</td><td>Cantidad Trabajadores</td><td>Cuenta bancaria</td></tr>
                        <tr>
                            <td>@Html.TextBoxFor(model => model.dfecFunda, new { style = "width:60px;text-transform:none;", maxlength = 10, readOnly = true })</td>
                            <td>@Html.TextBoxFor(model => model.nNumTrabaja, new { @class = "textBoxMay", style = "width:50px;text-transform:none;", maxlength = 6,  onkeypress = "return validarSoloNumeros(event);", onpaste = "return false;"})</td>
                            <td>@Html.TextBoxFor(model => model.vCuentaBanco, new { @class = "textBoxMay", style = "width:200px;text-transform:none;", maxlength = 50, onkeypress = "return validaAlfaNumTamanio(this,event,50);", onpaste = "return false;"})</td>    
                        </tr>
                    </tbody>
                    </table>
                </td>
            </tr>
        </tbody>
    </table>
</fieldset>
    <table border="0" cellpadding="10" cellspacing="0" style="width:80%;">
        <tr align="center">
            <td width="30%"><b>Campo Obligatorio:</b>&nbsp;<span class="asterisco">(*)</span></td>
            <td width="60%"><input type="button" value="Registrar Datos" onclick="javascript: addEmpresaPopFinal(this.form);" /></td>
            <td width="10%" align="right"><img src="@Url.Content("~/images/sunat.jpg")" class="lupita3" alt="SUNAT" onclick="javascript:consultaSunat();" /></td>
        </tr>
    </table>
}
<div id="divPopupJQ"></div>   